var myApp = angular.module('MyIndex', ['ng', 'ui.router', 'infinite-scroll'])
    .run(function ($rootScope, $state, $stateParams, $location) {
        $rootScope.$state = $state;
        $rootScope.$stateParams = $stateParams;

        $rootScope.$on('$locationChangeStart', function () {
            var cate1 = $location.path()
            var cate = cate1.replace(/[/]/, "")
            var path = 'default' + '|' + 'nav' + '|'+cate;
            _hmt.push(['_trackEvent', path, 'enter', 'default']);
        });
    })
    .config(function ($stateProvider, $urlRouterProvider) {
        $urlRouterProvider.otherwise('/home');
        $stateProvider
            // .state('double_eleven', {
            //     url: '/double_eleven',
            //     templateUrl: 'Views/double_eleven.aspx?v=1',
            //     controller: 'doubleElevenController'
            // })
            .state('home', {
                url: '/home',
                templateUrl: 'Views/home.aspx?v=1',
                controller: 'VHome'
            })
            .state('spxx', {
                url: '/spxx',
                templateUrl: 'Views/list.aspx?v=1',
                controller: 'ListController'
            })
            .state('myzq', {
                url: '/myzq',
                templateUrl: 'Views/list.aspx?v=1',
                controller: 'ListController'
            })
            .state('slgs', {
                url: '/snsg',
                templateUrl: 'Views/ListTwo.aspx?v=1',
                controller: 'ListController'
            })
            .state('lszb', {
                url: '/lszb',
                templateUrl: 'Views/list.aspx?v=1',
                controller: 'ListController'
            })
            .state('lygh', {
                url: '/lymm',
                templateUrl: 'Views/list.aspx?v=1',
                controller: 'ListController'
            })
            .state('mcjs', {
                url: '/mcjs',
                templateUrl: 'Views/list.aspx?v=1',
                controller: 'ListController'
            })
            .state('jdjj', {
                url: '/jydq',
                templateUrl: 'Views/list.aspx?v=1',
                controller: 'ListController'
            })
            .state('mzzq', {
                url: '/mzzq',
                templateUrl: 'Views/list.aspx?v=1',
                controller: 'ListController'
            })
    })
